#ifndef QTSTRA_XML_H
#define QTSTRA_XML_H
#pragma once
#include "nonqtmain.h"




class QtStraXml
{
public:

	QtStraXml(char* filename);

	~QtStraXml();

	bool GetRowAndColCnt(int& rowcnt, int& colcnt);

	bool GetColumnName(vector < char* >& attriRow);


	bool ReadXml(int rowcnt, vector < pair<char*, char*> >& attriRow);
	bool WriteXml(vector < pair<char*, char*> >& attriRow);
	bool ClearXml();

	void SaveFile();

private:

	void InitXmlParse(const char* filename);

	void InitRowAndColCnt();

	

private:
	string m_filename;
	bool m_bvalid;
	int m_rowcnt;
	int m_colcnt;
	//vector <char*> m_attriList;


	TiXmlDocument* m_doc;


	TiXmlElement* m_property;
	TiXmlElement* m_user;
	//TiXmlElement* m_user_back;

	/*TiXmlElement* m_readdataElement;
	TiXmlElement* m_writedataElement;
	TiXmlElement* m_first_readwritedataElement;*/



};




#endif